package cc.linker.steplink.crm.dao;

import cc.linker.steplink.crm.domain.RobotDynamicPo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author snake
 * @date 2019/8/27
 **/
public interface ClientRobotDao {
    List<Map<String, Object>> articlelist(Map<String, Object> map);

    Integer addRobotArticle(Map<String, Object> map);

    Integer delRobotArticle(Map<String, Object> map);

    List<Map<String, Object>> getUserArticleInfo();

    String getArticleLabelByOrgIdAndType(@Param("orgId") String orgId, @Param("type") String type);

    String getLastPushTimeByOpenIdAndToken(@Param("openid") String openid, @Param("token") String token);

    List<Map<String, Object>> getUserPushArticle(@Param("openid") String openid, @Param("token") String token);

    List<String> getArticleIdByLabel(@Param("oneLabelId") String oneLabelId,@Param("orgId") String orgId);

    List<String> getPushArticleId(@Param("openid") String openid,@Param("token") String token);

    Map<String,String> getOneArticle(@Param("oneArticleId") String oneArticleId,@Param("orgId") String orgId);

    Integer addRobotStatistics(Map<String, Object> map);

    List<Map<String, String>> getOrgIds();

    Integer getMaintainNum(@Param("orgId") String orgId);

    Integer getReadTime(@Param("orgId") String orgId,@Param("startTime") String startTime,@Param("endTime") String endTime);

    Integer getTranRate(@Param("orgId") String orgId, @Param("startTime") String startTime,@Param("endTime") String endTime);

    Integer getTouchNum(@Param("orgId") String orgId, @Param("startTime") String startTime,@Param("endTime") String endTime);

    Integer getFollowNum(@Param("orgId") String orgId,@Param("startTime") String startTime,@Param("endTime") String endTime);

    Integer getUnfollowNum(@Param("orgId") String orgId,@Param("startTime") String startTime,@Param("endTime") String endTime);

    String getActivity(@Param("orgId") String orgId);

    Integer getMaintainTimes(@Param("orgId") String orgId,@Param("type") String type);

    List<RobotDynamicPo> getRobotDynamicList(Map<String, Object> param);

    Integer getActiveFans(@Param("orgId") String orgId);

    Integer getOrderCount(@Param("orgId") String orgId);

    Integer getMaintainPerson(@Param("orgId") String orgId, @Param("type") String type);

    Integer adjustmentTimes(@Param("orgId") String orgId, @Param("type") String type);

    Map<String,Object> maintainBlock(Map<String, String> param);

    List<Map<String,Object>> robotChart(Map<String, String> param);
}
